package com.water.wfo.component.util;

import com.water.wfo.component.constant.SystemConstants;
/*
 * @Author Administrator
 * @Description
 * @param null
 * @Return
 * @Date 2024/6/13 16:20
 *
 */
public class BootUtil {
    public static final String getBootConfigPath(){
        String configPath = System.getProperty(SystemConstants.BOOT_CONFIG_PATH);
        if (StringUtil.isBlank(configPath)) {
            // jvm参数获取不到, 默认从工程根下configs目录读取
            String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath();
            configPath = StringUtil.substringBefore(basePath, "target") + "configs/";
        }
        return configPath;
    }

}
